home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Views
/
Canvas Loops
/
CanvasRowLoop.cp
< prev
next >
Wrap
Text File
|
2000-06-23
|
705b
|
38 lines
// CanvasRowLoop.cp
#ifndef CanvasRowLoop_h
#include "CanvasRowLoop.h"
#endif
CanvasRowLoop::CanvasRowLoop( const Canvas& theParent,
Range32 firstRow )
: parent( theParent ),
canvas( theParent ),
row( firstRow )
{
if ( Unfinished() )
{
canvas.SliceHorizontally( row );
canvasMaintainer.Use( canvas );
}
else
canvasMaintainer.UseNone();
}
void CanvasRowLoop::NextRow( uint32 height )
{
Assert( Unfinished() );
Assert( height <= maxint32 - row.End() );
row = Range32( row.End(), row.End() + height );
if ( Unfinished() )
{
canvas = parent;
canvas.SliceHorizontally( row );
canvasMaintainer.Use( canvas );
}
else
canvasMaintainer.UseNone();
}